package com.wolf.system.controller;

import com.wolf.system.model.SysUser;
import com.wolf.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping(value = "/indexCtrl")
public class IndexController {

    @Autowired
    private ISysUserService manager;


    /**
     * 跳转首页
     *
     * @return
     */
    @RequestMapping(value = "/index")
    public String index(Model model) {
        SysUser sysUser = manager.getSessionSysUser();
        model.addAttribute("sysUser", sysUser);
        model.addAttribute("currentUrl", "/indexCtrl/index");
        model.addAttribute("currentTitle", "首页");
        return "index";
    }
}
